/*
 * @Author: funlee
 * @Email: i@funlee.cn
 * @Date: 2018-06-15 16:38:36
 * @Description: ramda-array 
 */
import * as _ from 'ramda';

const log = console.log.bind(this);

const arr = ['aaa', 'bbb', 'ccc', 'ddd', 777];
const arrMix = [{ name: 'fun', age: 22 }, { name: 'lee', age: 10 }];

log(_.contains('aaa')(arr))
log(_.all(v => typeof v === 'string')(arr))
log(_.any(v => _.has('age', v))(arrMix))

log(_.head(arr))
log(_.head('funlee'))
log(_.tail(arr))

log(_.init(arr))
log(_.nth(2)(arr))

log(_.countBy(v => typeof v === 'string')(arr))

log(_.splitAt(2)(arr))
log(_.splitEvery(2)(arr))




